<template>
  <div class="commentVideo" v-if="videoUrl">
    <div class="videoMask"></div>
    <div class="videoBox" v-if="videoUrl">
      <video :src="videoUrl" controls autoplay="true" :custom-cache="videoCache"></video>
    </div>
  </div>
</template>

<script>

export default {
  data () {
    return {
      videoUrl: '',
      videoCache: false
    }
  },
  mounted () {
    // let self = this
    // // 初始化 评论视频界面
    // self.initCommentVideo()
  },
  methods: {
    // 初始化 评论视频界面
    initCommentVideo(){
        let self = this;
        self.videoUrl = ''
        console.log(self.$root.$mp.query, '......this.$root.$mp.query')
        if(self.$root.$mp.query.comment_video){
          self.videoUrl = self.$root.$mp.query.comment_video
        }
    },
  },
  // 页面展示
  onShow () {
    let self = this
    // 初始化 评论视频界面
    self.initCommentVideo()
  },  
}
</script>

<style lang="less" scoped>
.commentVideo{
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  .videoMask{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: #000;
  }
  .videoBox{
    width: 100%;
    height: 97%;
    video{
      width: 100%;
      height: 100%;
      z-index: 9999;
    }
  }
}
</style>
